3.98 \(\int \frac {a+a \sin (e+f x)}{c+d x} \, dx\)

Optimal. Leaf size=64 \[ \frac {a \text {Ci}\left (x f+\frac {c f}{d}\right ) \sin \left (e-\frac {c f}{d}\right )}{d}+\frac {a \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d}+\frac {a \log (c+d x)}{d} \]

[Out]

a*ln(d*x+c)/d+a*cos(-e+c*f/d)*Si(c*f/d+f*x)/d-a*Ci(c*f/d+f*x)*sin(-e+c*f/d)/d

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3317, 3303, 3299, 3302} \[ \frac {a \text {CosIntegral}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d}+\frac {a \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d}+\frac {a \log (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])/(c + d*x),x]

[Out]

(a*Log[c + d*x])/d + (a*CosIntegral[(c*f)/d + f*x]*Sin[e - (c*f)/d])/d + (a*Cos[e - (c*f)/d]*SinIntegral[(c*f)
/d + f*x])/d

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3317

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rubi steps

\begin {align*} \int \frac {a+a \sin (e+f x)}{c+d x} \, dx &=\int \left (\frac {a}{c+d x}+\frac {a \sin (e+f x)}{c+d x}\right ) \, dx\\ &=\frac {a \log (c+d x)}{d}+a \int \frac {\sin (e+f x)}{c+d x} \, dx\\ &=\frac {a \log (c+d x)}{d}+\left (a \cos \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sin \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx+\left (a \sin \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cos \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx\\ &=\frac {a \log (c+d x)}{d}+\frac {a \text {Ci}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d}+\frac {a \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.33, size = 54, normalized size = 0.84 \[ \frac {a \left (\text {Ci}\left (f \left (\frac {c}{d}+x\right )\right ) \sin \left (e-\frac {c f}{d}\right )+\cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )+\log (c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])/(c + d*x),x]

[Out]

(a*(Log[c + d*x] + CosIntegral[f*(c/d + x)]*Sin[e - (c*f)/d] + Cos[e - (c*f)/d]*SinIntegral[f*(c/d + x)]))/d

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 93, normalized size = 1.45 \[ \frac {2 \, a \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {d f x + c f}{d}\right ) + 2 \, a \log \left (d x + c\right ) - {\left (a \operatorname {Ci}\left (\frac {d f x + c f}{d}\right ) + a \operatorname {Ci}\left (-\frac {d f x + c f}{d}\right )\right )} \sin \left (-\frac {d e - c f}{d}\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))/(d*x+c),x, algorithm="fricas")

[Out]

1/2*(2*a*cos(-(d*e - c*f)/d)*sin_integral((d*f*x + c*f)/d) + 2*a*log(d*x + c) - (a*cos_integral((d*f*x + c*f)/
d) + a*cos_integral(-(d*f*x + c*f)/d))*sin(-(d*e - c*f)/d))/d

________________________________________________________________________________________

giac [C]  time = 0.40, size = 712, normalized size = 11.12 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))/(d*x+c),x, algorithm="giac")

[Out]

1/2*(a*imag_part(cos_integral(f*x + c*f/d))*tan(1/2*c*f/d)^2*tan(1/2*e)^2 - a*imag_part(cos_integral(-f*x - c*
f/d))*tan(1/2*c*f/d)^2*tan(1/2*e)^2 + 2*a*log(abs(d*x + c))*tan(1/2*c*f/d)^2*tan(1/2*e)^2 + 2*a*sin_integral((
d*f*x + c*f)/d)*tan(1/2*c*f/d)^2*tan(1/2*e)^2 - 2*a*real_part(cos_integral(f*x + c*f/d))*tan(1/2*c*f/d)^2*tan(
1/2*e) - 2*a*real_part(cos_integral(-f*x - c*f/d))*tan(1/2*c*f/d)^2*tan(1/2*e) + 2*a*real_part(cos_integral(f*
x + c*f/d))*tan(1/2*c*f/d)*tan(1/2*e)^2 + 2*a*real_part(cos_integral(-f*x - c*f/d))*tan(1/2*c*f/d)*tan(1/2*e)^
2 - a*imag_part(cos_integral(f*x + c*f/d))*tan(1/2*c*f/d)^2 + a*imag_part(cos_integral(-f*x - c*f/d))*tan(1/2*
c*f/d)^2 + 2*a*log(abs(d*x + c))*tan(1/2*c*f/d)^2 - 2*a*sin_integral((d*f*x + c*f)/d)*tan(1/2*c*f/d)^2 + 4*a*i
mag_part(cos_integral(f*x + c*f/d))*tan(1/2*c*f/d)*tan(1/2*e) - 4*a*imag_part(cos_integral(-f*x - c*f/d))*tan(
1/2*c*f/d)*tan(1/2*e) + 8*a*sin_integral((d*f*x + c*f)/d)*tan(1/2*c*f/d)*tan(1/2*e) - a*imag_part(cos_integral
(f*x + c*f/d))*tan(1/2*e)^2 + a*imag_part(cos_integral(-f*x - c*f/d))*tan(1/2*e)^2 + 2*a*log(abs(d*x + c))*tan
(1/2*e)^2 - 2*a*sin_integral((d*f*x + c*f)/d)*tan(1/2*e)^2 - 2*a*real_part(cos_integral(f*x + c*f/d))*tan(1/2*
c*f/d) - 2*a*real_part(cos_integral(-f*x - c*f/d))*tan(1/2*c*f/d) + 2*a*real_part(cos_integral(f*x + c*f/d))*t
an(1/2*e) + 2*a*real_part(cos_integral(-f*x - c*f/d))*tan(1/2*e) + a*imag_part(cos_integral(f*x + c*f/d)) - a*
imag_part(cos_integral(-f*x - c*f/d)) + 2*a*log(abs(d*x + c)) + 2*a*sin_integral((d*f*x + c*f)/d))/(d*tan(1/2*
c*f/d)^2*tan(1/2*e)^2 + d*tan(1/2*c*f/d)^2 + d*tan(1/2*e)^2 + d)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 96, normalized size = 1.50 \[ \frac {a \Si \left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {a \Ci \left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}+\frac {a \ln \left (\left (f x +e \right ) d +c f -d e \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))/(d*x+c),x)

[Out]

a*Si(f*x+e+(c*f-d*e)/d)*cos((c*f-d*e)/d)/d-a*Ci(f*x+e+(c*f-d*e)/d)*sin((c*f-d*e)/d)/d+a*ln((f*x+e)*d+c*f-d*e)/
d

________________________________________________________________________________________

maxima [C]  time = 0.51, size = 171, normalized size = 2.67 \[ \frac {\frac {2 \, a f \log \left (c + \frac {{\left (f x + e\right )} d}{f} - \frac {d e}{f}\right )}{d} + \frac {{\left (f {\left (-i \, E_{1}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + i \, E_{1}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \cos \left (-\frac {d e - c f}{d}\right ) + f {\left (E_{1}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + E_{1}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \sin \left (-\frac {d e - c f}{d}\right )\right )} a}{d}}{2 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))/(d*x+c),x, algorithm="maxima")

[Out]

1/2*(2*a*f*log(c + (f*x + e)*d/f - d*e/f)/d + (f*(-I*exp_integral_e(1, (I*(f*x + e)*d - I*d*e + I*c*f)/d) + I*
exp_integral_e(1, -(I*(f*x + e)*d - I*d*e + I*c*f)/d))*cos(-(d*e - c*f)/d) + f*(exp_integral_e(1, (I*(f*x + e)
*d - I*d*e + I*c*f)/d) + exp_integral_e(1, -(I*(f*x + e)*d - I*d*e + I*c*f)/d))*sin(-(d*e - c*f)/d))*a/d)/f

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {a+a\,\sin \left (e+f\,x\right )}{c+d\,x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(e + f*x))/(c + d*x),x)

[Out]

int((a + a*sin(e + f*x))/(c + d*x), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a \left (\int \frac {\sin {\left (e + f x \right )}}{c + d x}\, dx + \int \frac {1}{c + d x}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))/(d*x+c),x)

[Out]

a*(Integral(sin(e + f*x)/(c + d*x), x) + Integral(1/(c + d*x), x))

________________________________________________________________________________________